home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / sgrege_1 / substrin.h < prev    next >
C/C++ Source or Header  |  1998-05-31  |  859b  |  39 lines

  1.  
  2. #ifndef __SUBSTRING_H_
  3. #define __SUBSTRING_H_
  4.  
  5. #include "resource.h"
  6.  
  7. class ATL_NO_VTABLE Substring : 
  8.     public CComObjectRootEx<CComSingleThreadModel>,
  9.     public CComCoClass<Substring, &CLSID_Substring>,
  10.     public ISupportErrorInfo,
  11.     public IDispatchImpl<ISubstring, &IID_ISubstring, &LIBID_sgRegExp>
  12. {
  13. public:
  14.     Substring()
  15.     {
  16.     }
  17.  
  18. BEGIN_COM_MAP(Substring)
  19.     COM_INTERFACE_ENTRY(ISubstring)
  20.     COM_INTERFACE_ENTRY(IDispatch)
  21.     COM_INTERFACE_ENTRY(ISupportErrorInfo)
  22. END_COM_MAP()
  23.  
  24.     // ISupportsErrorInfo
  25.     STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  26.  
  27.     // ISubstring
  28.     STDMETHOD(get_Value)(/*[out, retval]*/ BSTR* res);
  29.     STDMETHOD(get_Start)(/*[out, retval]*/ long* res);
  30.     STDMETHOD(get_Length)(/*[out, retval]*/ long* res);
  31.  
  32.     // Implementation
  33.     _bstr_t    m_Value;
  34.     long        m_Start;
  35.     long        m_Length;
  36. };
  37.  
  38. #endif //__SUBSTRING_H_
  39.